Support `nostrip' DEB_BUILD_OPTIONS
authorKan-Ru Chen <koster@debian.org>
Sat, 17 Dec 2011 10:34:01 +0000 (18:34 +0800)
committerKan-Ru Chen <koster@debian.org>
Sat, 17 Dec 2011 10:34:01 +0000 (18:34 +0800)
debian/changelog
debian/rules

index bf8d94326d3a090fec5a798b436f50d75bcb21eb..b7c8e992213ed2925c63c6c8f9a891bb3440748d 100644 (file)
@@ -2,6 +2,7 @@ opencc (0.3.0-1) unstable; urgency=low
 
   * New upstream release
   * Remove autotools-dev and quilt from Build-Depends
+  * Support `nostrip' DEB_BUILD_OPTIONS
   * debian/patches/fix-big-endian-build.diff: merged upstream
   * debian/patches/fix-new-test-cases.patch: New patch.
 
index 3bc514fbc295a91034a55badc5f92269c1ad18f6..c81f1fa628016594ae6c8862cab161a739f76578 100755 (executable)
@@ -1,6 +1,13 @@
 #!/usr/bin/make -f
+
+ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
+  BUILD_TYPE=Release
+else
+  BUILD_TYPE=Debug
+endif
+
 %:
        dh  $@
 
 override_dh_auto_configure:
-       dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT:BOOL=ON
+       dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_GETTEXT:BOOL=ON